package cn.south.campus.business.model.enums;

/**
 * <p>
 *
 * </p>
 *
 * @author chow
 * @since 2024/12/2 11:03
 */
public interface OrderEnums {
    Integer getCode();

    String getDesc();

    enum OrderStatus implements OrderEnums {
        //0未完成，1已完成，2已取消
        UNFINISHED(0, "未完成"),
        DELIVER(1,"待交货"),
        RECEIVE(2, "待收货"),
        FINISHED(3, "已完成/已收货"),
        CANCEL(4, "已取消"),
        REFUNDING(5, "退款中"),
        REFUND(6, "已退款"),
        ;
        private final Integer code;
        private final String desc;

        OrderStatus(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        @Override
        public Integer getCode() {
            return code;
        }

        @Override
        public String getDesc() {
            return desc;
        }
    }

    enum OrderPayStatus implements OrderEnums {
        //0未支付，1已支付，2已取消
        UNPAID(0, "未支付"),
        PAID(1, "已支付");
        private final Integer code;
        private final String desc;

        OrderPayStatus(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        @Override
        public Integer getCode() {
            return code;
        }

        @Override
        public String getDesc() {
            return desc;
        }
    }
}
